package com.feri.fitness.network.oss.controller;

import com.feri.fitness.common.vo.R;
import com.feri.fitness.network.oss.entity.Osslog;
import com.feri.fitness.network.oss.service.intf.OsslogService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * 千锋郑州Java学科欢迎你
 * @program: Fitness
 * @description: 控制层实现常用的外部接口
 * @author: Feri
 * @create: 2023-01-12 08:59:28
 */
@RestController
@RequestMapping("/server/osslog/")
public class OsslogController {
    /**
    *注入业务逻辑层对象*/
    @Resource
    private OsslogService service;
    /**
     * 上传图片*/
    @PostMapping("uploadimg.do")
    public R uploadImg(MultipartFile file){
        return service.uploadImg(file);
    }
    /**
     * 上传视频*/
    @PostMapping("uploadvideo.do")
    public R uploadVideo(MultipartFile file){
        return service.uploadVideo(file);
    }

    /**
    * 查询 所有数据*/
    @GetMapping("all.do")
    public R all(){
       return service.queryAll();
    }
}